package com.egao.common.module.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * 爬虫设置
 * @author pyx
 */
@ApiModel(description = "爬虫")
@TableName("sys_crawler")
@Data
public class Crawler implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("名称")
    @NotBlank(message = "名称不为空")
    private String name;

    @ApiModelProperty("类型 0单位 1学院")
    @NotBlank(message = "类型不为空")
    private String type;

    @ApiModelProperty("是否显示 0不显示 1显示")
    @NotBlank(message = "是否显示不为空")
    private String reveal;

    @ApiModelProperty("是否爬取 0不爬取 1爬取")
    @NotBlank(message = "是否爬取不为空")
    private String crawler;

    @ApiModelProperty("网址路径")
    private String url;

    @ApiModelProperty("添加时间")
    private Date createTime;

    @ApiModelProperty("编辑时间")
    private Date updateTime;

    @ApiModelProperty("逻辑删除 0正常 1删除")
    @TableLogic
    private Integer deleted;

}
